package pers.zh.parking.data.enums;

public enum RecordStatus {

    RESERVING(1), CANCEL(2), PARKING(3), LEAVED(4), EVALUATED(5), UNKNOWN(999);

    private int status;

    RecordStatus(int status) {
        this.status = status;
    }

    public int getStatus() {
        return status;
    }

    public static RecordStatus parse(int status) {
        switch (status) {
            case 1:
                return RESERVING;
            case 2:
                return CANCEL;
            case 3:
                return PARKING;
            case 4:
                return LEAVED;
            case 5:
                return EVALUATED;
            default:
                return UNKNOWN;
        }
    }
}
